package utils;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

public class HttpJsoupUtil {

    public String getHTML(String url) {
        String html = "";
        try {
            Document document = Jsoup.connect(url).validateTLSCertificates(false).timeout(10 * 1000)
                    .header("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0")
                    .get();
            html = document.html();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return html;
    }

}